<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>

	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<title>奖惩管理</title>

	<link th:href="@{/js/jquery.js}" rel="stylesheet" />
	<script th:href="@{/css/bootstrap.min.css}"  ></script>
	<script th:href="@{/js/bootstrap.min.js}"  ></script>

	<link rel="stylesheet" type="text/css" href="../static/css/bootstrap.min.css"/>
	<script src="../static/js/jquery.js" type="text/javascript" charset="utf-8"></script>
	<script src="../static/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>


	<style type="text/css">
		#right{
			position: absolute;
			top: 80px;
			left:450px;
			width:1000px
		}
		table{

		}
		td{
			text-align: center;
		}
		.option{
			text-align: center;
		}
	</style>

</head>
<body>
<div th:replace="Top :: head"></div>
<div th:replace="Top :: left"></div>
<div id="right">
	<ul class="breadcrumb">
		<li><a href="/index">首页</a></li>
		<li><a href="">申请请假</a></li>
	</ul>
	<div class="ibox float-e-margins">
		<div class="ibox-title">
			<div class="ibox-tools">
				<a class="collapse-link">
					<i class="fa fa-chevron-up"></i>
				</a>
			</div>
		</div>
		<div class="ibox-content">
			<form id="formTag" action="/holiday/addHoliday" method="POST" class="form-horizontal" enctype="multipart/form-data">
				<div class="form-group"><label class="col-sm-2 control-label">请假人id：</label>
					<div class="col-sm-10">
						<input id="u_id" readonly="readonly" name="u_id" type="text" class="form-control" th:value="${session.user.u_id}"/>
					</div>
				</div>


				<div class="form-group"><label class="col-sm-2 control-label">请假人：</label>
					<div class="col-sm-10">
						<input id="u_nickname" readonly="readonly" name="u_nickname" type="text" class="form-control" th:value="${session.user.u_nickname}"/>
					</div>
				</div>

				<div class="form-group"><label class="col-sm-2 control-label">请假天数：</label>
					<div class="col-sm-10">
						<input id="h_day"  name="h_day" type="text" class="form-control" onkeyup="getvalue()"/>
					</div>
				</div>

				<div class="form-group"><label class="col-sm-2 control-label">请假原因：</label>
					<div class="col-sm-10">
						<input id="h_reason"  name="h_reason" type="text" class="form-control" />
					</div>
				</div>

				<div class="form-group"><label class="col-sm-2 control-label">应扣工资：</label>
					<div class="col-sm-10">
						<input id="h_salary" readonly="readonly" name="h_salary" type="text" class="form-control"/>
					</div>
				</div>


				<div class="hr-line-dashed"></div>
				<div class="form-group">
					<div class="col-sm-4 col-sm-offset-2">
						<button id="submitButton1" class="btn btn-primary" onclick="javascrtpt:window.location.href='holidayIndex'" type="button">&nbsp;&nbsp;&nbsp;&nbsp;返&nbsp;&nbsp;&nbsp;&nbsp;回&nbsp;&nbsp;&nbsp;&nbsp;</button>
					</div>
					<div class="col-sm-4 col-sm-offset-2">
						<button id="submitButton" class="btn btn-primary" type="button">&nbsp;&nbsp;&nbsp;&nbsp;提&nbsp;&nbsp;&nbsp;&nbsp;交&nbsp;&nbsp;&nbsp;&nbsp;</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>



</body>

<script>

	function getvalue(){
		var num=document.getElementById("h_day").value;
		document.getElementById("h_salary").value=parseInt(num)*100;
	}

	//提交
	$("#submitButton").click(function(){
		$("#formTag").submit();
	});
</script>
<script th:inline="javascript">
	var msg=[[${msg}]];
	if (msg!=null){
		alert(msg);
		window.location.href='holidayIndex';
	}
</script>

</html>